<%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2023-04-06
  Time: 10:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
  <%
      request.setCharacterEncoding("utf-8");
      String u=request.getParameter("username");
      String p=request.getParameter("passname");
      if(u.startsWith("java82")&&"1234".equals(p)){
          session.setAttribute("USER_LOGIN",u);
          request.setAttribute("msg","张良木说得对");
          // request.getRequestDispatcher("web1/a.jsp").forward(request,response);
           //response.sendRedirect("web1/welcome.jsp");
           response.sendRedirect("main.jsp");
          return;
      }
      out.print("错误的用户名或者密码");
  %>
</body>
</html>
